<?
require_once("lang.php");
require_once("functions/pagebreak.php");

ob_start("callback");

$db_type				= new db_query("SELECT *
											 FROM categories_multi
											 WHERE cat_active = 1 AND cat_id = " . $iCat . " AND lang_id = " . $lang_id);
if(mysql_num_rows($db_type->result) == 0){
	redirect(generate_module_url("notfound"));
}
$rowType				= mysql_fetch_assoc($db_type->result);
$module				= $rowType["cat_type"];
$_GET["module"]	= $module;
$urlType				= generate_type_url($rowType["cat_name"], $rowType["cat_id"]);
$listCatId			= (trim($rowType["cat_all_child"]) != "" ? $rowType["cat_all_child"] : $rowType["cat_id"]);
$listCatId			= convert_list_to_list_id($listCatId);
$db_type->close();
unset($db_type);

// Cấu hình các thẻ title, meta

$class_menu			= new menu();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="<?=str_replace("\n", "", htmlspecialchars($con_meta_keywords))?>" />
<meta name="description" content="<?=str_replace("\n", "", htmlspecialchars($con_meta_description))?>" />
<link href="<?=$con_root_path?>css/standard/favicon.ico" rel="icon" type="image/x-icon" />
<link href="<?=$con_root_path?>css/standard/favicon.ico" rel="shortcut icon" />
<title><?=$con_site_title?></title>
<style type="text/css" media="all">@import "<?=$con_root_path?>css/FSmain.css";</style>
<style type="text/css" media="all">@import "<?=$con_root_path?>css/standard/FStheme.css";</style>
<style type="text/css" media="all">@import "<?=$con_root_path?>css/standard/FStemplate.css";</style>
</head>
<body>
<div id="body">
	<div id="container_body">
		<div id="container_body_wrapper">
			<div id="container_header"><? include($real_path . "includes/inc_header.php");?></div>
			<div id="container_content">
			<?
			if($module == "news"){
			?>
				<div id="container_content_center">
					<div class="container_content_center"><? include($real_path . "includes/inc_type_news.php");?></div>
				</div>
			<?
			}
			elseif($module == "product"){
			?>
				<div id="container_content_top">
					<div class="container_content_top"><? include($real_path . "includes/inc_home_top.php");?></div>
				</div>
				<div id="container_content_left">
					<div class="container_content_left"><? include($real_path . "includes/inc_menu_" . $module . ".php");?></div>
				</div>
				<div id="container_content_center_right">
					<div class="container_content_center_right"><? include($real_path . "includes/inc_type_" . $module . ".php");?></div>
				</div>
			<?
			}
			?>
				<div class="clear"></div>
			</div>
			<div id="container_footer"><? include($real_path . "includes/inc_footer.php");?></div>
		</div>
	</div>
</div>
</body>
</html>
<?
ob_end_flush();
?>